// 这里存放 项目接口
const router = require('express').Router();
const db = require('../../db.js');

router.get('/eLabel', (req, res) => {
  let sql = 'SELECT * FROM list'
  db.query(`select * from label`, sql, (error, results) => {
    if (error) {
      res.json({
        code: 400,
        error: error.message
      });
      return
    }

    res.send({
      code: '200',
      data: {
        list: results
      }
    });
  });
});

module.exports = router;